from pydantic import BaseModel


class UserSchema(BaseModel):
    username: str
    password: str


class PasswordChangeRequestModel(BaseModel):
    new_password: str


class PasswordNewRequestModel(BaseModel):
    new_password: str
    updating_user_id: str


class StatusChangeRequestModel(BaseModel):
    new_status: bool


class ConfigChangeRequestModel(BaseModel):
    new_config: bool


class TokenData(BaseModel):
    id: str


class ParolusSchema(BaseModel):
    title: str
    login: str
    password: str


class uidSchema(BaseModel):
    uid: str


class UpdateParolusModel(BaseModel):
    title: str
    login: str
    password: str


def ResponseModel(data, message):
    return {
        "data": [data],
        "code": 200,
        "message": message,
    }


def ErrorResponseModel(error, code, message):
    return {"error": error, "code": code, "message": message}
